package com.stephen.dubbo.data;

import com.stephen.dubbo.entity.Product;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by ssc on 2021-02-28 21:09 .
 * Description:
 */
public class ProductData {

    private static final Map<Long, Product> map = new HashMap<>();

    static {
        map.put(1L,new Product(1L,"张三"));
        map.put(2L,new Product(2L,"李四"));
        map.put(3L,new Product(3L,"王五"));
    }

    public static Product get(Long id) {
        return map.get(id);
    }

}
